The invention relates to a method of generating image values of an output image as set forth in the precharacterizing part of claim 1. The invention furthermore relates to a device and a computer readable medium containing a program implementing the decompression according to that method.
Such a method is known from an publication by G. Campbell, T. Defanti and J. Frederiksen published in the ACM SIGGRAPH 86 conference proceedings, Vol. 20, no. 4 (1986) pages 215–223. This known method is directed in particular at compression of texture maps for use in computer graphics, where the method is useful because it can perform decompression at real time speeds and is compatible with computer graphics architectures for texture mapping.
The known method is concerned with image compression and decompression. For decompression the output image is divided into a matrix of rectangular regions (typically 4×4 image locations). For each region a set of two color values is defined. For each image location a single bit of information is stored in a pixel map. This bit selects the image value for the image location. If the bit has a first value, say 0, the image value is a first one of the two colors defined for the region to which the image location belongs and if the bit has a second value, say 1, the image value is a second one of these two colors.
For compression the average luminance of the color values from a source image is determined for each region and the image locations in each region are divided into two groups according to whether their luminance in the source image is above the average for the region or not. Image locations with a luminance value above the average for their region are coded for example as 1 in the pixel map, the other image locations are coded as 0. Instead of luminance values other properties of the color can also be used: see for example a publication by G. Knittel, A. Schilling, A. Kugler and W. Straszer, titled “Hardware for superior texture performance” published in Computers and Graphics, vol. 20 No.4 pp 475–481, July–August 1996.
The pair of color values for a region is determined by forming two averages, one from the color values of each group respectively.
This method preserves the average luminance in each region and some of the color value variations. The method requires only 4 bits per image location to store the compressed image in case of 4×4 regions and 24 bit color values.
The publication shows how this number of bits per image location can be reduced further by constructing a color look-up table (CLUT) from the color values used in the various pairs, followed by coding of the pairs of color values by reference to the (CLUT). If a 256 color CLUT is constructed only 2 bits are needed per image location. However, the construction of the color look-up table is time consuming and makes compression slow, moreover it will not in general be clear according to which criteria such a CLUT should best be constructed.